home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / grep / grep.lzh / Makefile < prev    next >
Makefile  |  1989-03-02  |  777b  |  41 lines

  1. #
  2. # Makefile for GNU e?grep
  3. #
  4.  
  5. # Add -DUSG for System V.
  6. CFLAGS = -O
  7.  
  8. #
  9. # You may add getopt.o if your C library lacks getopt(); note that
  10. # 4.3BSD getopt() is said to be somewhat broken.
  11. #
  12. # Add alloca.o if your machine does not support alloca().
  13. #
  14. OBJS = dfa.o regex.o
  15. GOBJ = grep.o
  16. EOBJ = egrep.o
  17.  
  18. # Space provided for machine dependent libraries.
  19. LIBS =
  20.  
  21. all: regress
  22.  
  23. regress: egrep grep
  24.     cd tests; sh regress.sh
  25.  
  26. egrep: $(OBJS) $(EOBJ)
  27.     $(CC) $(CFLAGS) -o egrep $(OBJS) $(EOBJ) $(LIBS)
  28.  
  29. egrep.o: grep.c
  30.     $(CC) $(CFLAGS) -DEGREP -c grep.c
  31.     mv grep.o egrep.o
  32.  
  33. grep: $(OBJS) $(GOBJ)
  34.     $(CC) $(CFLAGS) -o grep $(OBJS) $(GOBJ) $(LIBS)
  35.  
  36. clean:
  37.     rm -f grep egrep *.o core tests/core tests/tmp.script tests/khadafy.out
  38.  
  39. dfa.o egrep.o grep.o: dfa.h
  40. egrep.o grep.o regex.o: regex.h
  41.